Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix invalidate stack if the next image is different PI #631

Conversation

medicalconnections
Copy link
Contributor

Context

When the StackViewport's stack (series) has images that have different Photometric Interpretation, they would get rendered incorrectly. For example if there was 1 RGB image in a stack of Monochrome2 images, the RGB image would be rendered as if it is a Monochrome2 image.

Changes & Results

Invalidate the stack if we find a mismatch between the PI of the previous and the new image. This will force recreation of the VTK imageData object.

Testing

Tested with various US studies that had few RGB images next to MONOCHROME2.

Checklist

PR

  • [] My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

Public Documentation Updates

  • [] The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • [] "OS:
  • [] "Node version:
  • [] "Browser:

@netlify
Copy link

netlify bot commented May 25, 2023

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit 82bba8e
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/6489aa0ea0735000086149db
😎 Deploy Preview https://deploy-preview-631--cornerstone-3d-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@medicalconnections medicalconnections changed the title invalidate stack if the next image is different PI fix invalidate stack if the next image is different PI May 25, 2023
@sedghi sedghi merged commit 24ae3c9 into cornerstonejs:main Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants